package com.walle.gatewayserver.controller;

import com.walle.gatewayserver.service.ITokenService;
import com.walle.gatewayserver.vo.ApiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Scope("prototype")
@RequestMapping("/walle")
public class BaseController {

	@Autowired
	private ITokenService tokenService;
	
    @RequestMapping(value = "/logout",method= {RequestMethod.POST})
    public ApiResult logout(@RequestHeader("token")String token, @RequestHeader("sysType")String sysType, @RequestHeader("uid")String uid) {

    	ApiResult apiResult = tokenService.logout(token, sysType);
        
        return apiResult;
    }
	
	
}
